Computers include general purpose central processing units (CPUs) that are designed to execute a specific set of system instructions. A group of processors that have similar architecture or design specifications may be considered to be members of the same processor family. Examples of current processor families include the Motorola 680X0 processor family, manufactured by Motorola, Inc. of Phoenix, Ariz.; the Intel 80X86 processor family, manufactured by Intel Corporation of Sunnyvale, Calif.; and the PowerPC processor family, which is manufactured by Motorola, Inc. and used in computers manufactured by Apple Computer, Inc. of Cupertino, Calif. Although a group of processors may be in the same family because of their similar architecture and design considerations, processors may vary widely within a family according to their clock speed and other performance parameters.
Each family of microprocessors executes instructions that are unique to the processor family. The collective set of instructions that a processor or family of processors can execute is known as the processor's instruction set. As an example, the instruction set used by the Intel 80X86 processor family is incompatible with the instruction set used by the PowerPC processor family. The Intel 80X86 instruction set is based on the Complex Instruction Set Computer (CISC) format. The Motorola PowerPC instruction set is based on the Reduced Instruction Set Computer (RISC) format. CISC processors use a large number of instructions, some of which can perform rather complicated functions, but which require generally many clock cycles to execute. RISC processors use a smaller number of available instructions to perform a simpler set of functions that are executed at a much higher rate.
The uniqueness of the processor family among computer systems also typically results in incompatibility among the other elements of hardware architecture of the computer systems. A computer system manufactured with a processor from the Intel 80X86 processor family will have a hardware architecture that is different from the hardware architecture of a computer system manufactured with a processor from the PowerPC processor family. Because of the uniqueness of the processor instruction set and a computer system's hardware architecture, application software programs are typically written to run on a particular computer system running a particular operating system.
Computer manufacturers want to maximize their market share by having more rather than fewer applications run on the microprocessor family associated with the computer manufacturers' product line. To expand the number of operating systems and application programs that can run on a computer system, a field of technology has developed in which a given computer having one type of CPU, called a host, will include an emulator program that allows the host computer to emulate the instructions of an unrelated type of CPU, called a guest. Thus, the host computer will execute an application that will cause one or more host instructions to be called in response to a given guest instruction. Thus the host computer can both run software design for its own hardware architecture and software written for computers having an unrelated hardware architecture. As a more specific example, a computer system manufactured by Apple Computer, for example, may run operating systems and program written for PC-based computer systems. It may also be possible to use an emulator program to operate concurrently on a single CPU multiple incompatible operating systems. In this arrangement, although each operating system is incompatible with the other, an emulator program can host one of the two operating systems, allowing the otherwise incompatible operating systems to run concurrently on the same computer system.
When a guest computer system is emulated on a host computer system, the guest computer system is said to be a “virtual machine” as the guest computer system only exists in the host computer system as a pure software representation of the operation of one specific hardware architecture. The terms emulator, virtual machine, and processor emulation are sometimes used interchangeably to denote the ability to mimic or emulate the hardware architecture of an entire computer system. As an example, the Virtual PC software created by Connectix Corporation of San Mateo, Calif. emulates an entire computer that includes an Intel 80X86 Pentium processor and various motherboard components and cards. The operation of these components is emulated in the virtual machine that is being run on the host machine. An emulator program executing on the operating system software and hardware architecture of the host computer, such as a computer system having a PowerPC processor, mimics the operation of the entire guest computer system.
The emulator program acts as the interchange between the hardware architecture of the host machine and the instructions transmitted by the software running within the emulated environment. This emulator program may be a host operating system (HOS), which is an operating system running directly on the physical computer hardware. Alternately, the emulated environment might also be a virtual machine monitor (VMM) which is a software layer that runs directly above the hardware and which virtualizes all the resources of the machine by exposing interfaces that are the same as the hardware the VMM is virtualizing (which enables the VMM to go unnoticed by operating system layers running above it). A host operating system and a VMM may run side-by-side on the same physical hardware.
One of the many advantages of a virtual machine (VM) over a physical machine is the ability to quickly and cheaply create multiple instances of the same virtual machine. If allowed by the virtual machine implementation, multiple virtual machines can exist simultaneously in a single host machine (host computer system) environment, and resources of the host machine can be divided among the various virtual machines. This flexible resource allocation becomes even more useful when combined with the ability to move, or “migrate,” virtual machines from one host machine to another.
Being able to migrate a virtual machine quickly and easily from one host machine to another is useful, for example, for “load balancing” systems, performing hardware or software upgrades, or handling disaster recovery. More specifically, if a virtual machine requires more processing power than is available on one host machine, it can be moved to another host machine that has extra capacity. Second, if the host machine requires hardware maintenance or a software upgrade, the virtual machine may be migrated from one physical machine to another temporarily, which thereby allows the first physical machine to be taken down and upgraded. Last, in the case of disaster recovery, if, for example, an impending flood or storm is predicted, all virtual machines of a datacenter can be migrated to another datacenter that is out of harm's way and then migrated back when the threat passes. In all cases, this allows, for example, critical business applications to remain up and running without interruption and without the user even being aware of the interruption.
Performing a VM migration process involves moving all the states of the virtual machine. These states include three areas: (1) the VM virtualized device state, which is the internal states of all virtualized controllers and motherboard virtualized devices, such as the virtualized interrupt controller, virtualized SCSI controller, and virtualized video controller; (2) the VM memory state; and (3) the VM disk state, which is the persistent storage.
Methods have been described for migrating the device state and memory state of virtual machines. For example, U.S. patent application No. 2004/0010787, filed on Jul. 11, 2002 and entitled “METHOD FOR FORKING OR MIGRATING A VIRTUAL MACHINE” (hereinafter, the '787 patent application) describes a method for increasing the efficiency of virtual machine processing. A parent virtual machine is provided on a host computer. The parent virtual machine is temporarily or permanently suspended. A child virtual machine is created at a new location by forking the parent virtual machine. However, the child virtual machine may not initially include all the stored data that is associated with the parent virtual machine.
The reason for this shortcoming is that physically copying disk data from one host machine to another is impractical because of the large volume of data (e.g., a terabyte or more) and, consequently, the time required to perform a copy of such a large amount of data. So while the '787 patent application discusses the migration of the device state and the memory state of a virtual machine, the '787 patent application does not provide a technique for migrating the disk state of a virtual machine. Therefore, what is needed is a way to perform a virtual machine migration process, including the disk state, without the user's awareness and, therefore, without the user's experiencing any noticeable interruption.
In addition to the foregoing, there are also instances where the disk space associated with a virtual machine is not located locally, but instead, is located in a central storage point, such as a remotely located storage area network (SAN) or network attached storage (NAS) server, which serves several physical host machines. What is needed is a way to quickly disconnect and reconnect a remotely located storage device between two hosts during the virtual machine migration process and, furthermore, to handle disk transactions during the migration process that are still in process in the active virtual machine.